package ooday01;
//学生的测试类
public class StudentTest {
    public static void main(String[] args) {
//        1)创建对象
//      数据类型  引用(引用类型变量)   指向       对象
        Student    zs               =     new Student();//声明student类型引用zs指向一个学生对象
//        2)调用(访问)成员变量：对象打点(点相当于的)
        zs.name ="zhangsan";
        zs.age = 33;
        zs.className ="JSD2302";
        zs.stuId ="001";
        //调用方法
        zs.study();
        zs.sayHi();
        zs.playWith("lisi");
        Student LS = new Student();
        LS.name = "马云峰";
        LS.age = 23;
        LS.className ="jsd2302";
        LS.stuId = "002";
        LS.study();
        LS.sayHi();
        LS.playWith("宋曾龙");
        //调用构造方法
        Student ww = new Student();
        ww.study();
        ww.sayHi();
        ww.playWith("张代伟");
    }
}
